
	//检查昵称输入
	function checkUsername(obj,objTip){
		if(obj.value.length == 0){
			objTip.style.color = "#f63";
			objTip.innerHTML = "昵称不能为空";
			return false;
		}else if(obj.value.length < 2 || obj.value.length > 12){
			objTip.style.color = "#f63";
			objTip.innerHTML = "昵称长度在2~12之间";
			return false;
		}else{
			objTip.style.color = "#0c0";
			objTip.innerHTML = "昵称√";
			return true;
		}
	}

	//检查邮箱输入
	function checkEmail(obj,objTip){
		if(obj.value.length == 0){
			objTip.style.color = "#f63"
			objTip.innerHTML = "邮箱不能为空";
			return false;
		}else if(!checkEmailFormat(obj.value)){
			objTip.style.color = "#f63"
			objTip.innerHTML = "邮箱格式不合法";
			return false;
		}else{
			objTip.style.color = "#0c0"
			objTip.innerHTML = "邮箱格式合法√";
			return true;
		}
	}
	function checkEmailFormat(email){
		var reg = /^[0-9a-zA-Z_\-\.]{1,15}\@[0-9a-zA-Z\_\-]{2,10}\.[0-9a-zA-Z_-]{2,5}$/
		return email.match(reg);
	}

	//检查密码输入
	function checkPassword(obj,objTip,objSure,sureTip){
		var isOk = false
		if(obj.value.length == 0){
			objTip.style.color = "#f63";
			objTip.innerHTML = "密码不能为空";
		}else if(obj.value.length < 6 || obj.value.length > 16){
			objTip.style.color = "#f63";
			objTip.innerHTML = "密码长度在6~16之间";
		}else{
			objTip.style.color = "#0c0";
			objTip.innerHTML = "密码√";
			isOk =  true;
		}
		if(objSure && objSure.value.length != 0){
			isOk =  isOk && checkSurePassword(obj,objSure,sureTip);
		}
		return isOk;
	}

	//检查确认密码输入
	function checkSurePassword(obj,objSure,sureTip){
		if(objSure.value.length == 0){
			sureTip.style.color = "#f63";
			sureTip.innerHTML = "请确认密码";
			return false;
		}else if(objSure.value != obj.value){
			sureTip.style.color = "#f63";
			sureTip.innerHTML = "确认密码与密码不符";
			return false;
		}else{
			sureTip.style.color = "#0c0";
			sureTip.innerHTML = "确认密码√";
			return true;
		}
	}

	//检查验证码输入
	function checkSecurityCode(obj,objTip){
		if(obj.value.length == 0){
			objTip.style.color = "#f63";
			objTip.innerHTML = "验证码不能为空";
			return false;
		}else if(obj.value.length != 6){
			objTip.style.color = "#f63";
			objTip.innerHTML = "验证码填写错误";
			return false;
		}else{
			objTip.style.color = "#0c0";
			objTip.innerHTML = "验证码填写完成√";
			return true;
		}
	}